package demo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 22652
 * Date: 2024-07-08
 * Time: 11:16
 */
@RestController
public class PropertiesController {

    @Value("${mykey.key1}")
    private String key;

    @Value("${spring.application.name}")
    private String name;

    @RequestMapping("/key")
    public String getKey() {
        return key+"   "+name;
    }
}
